import request from '@/utils/request'
// import storage from 'store'

const mainApi = {
  outApi: '/api/v1/outApi',
  setConfig: '/api/v1/pic/setConfig',
  getConfig: '/api/v1/pic/getConfig',
  getFileList: '/api/v1/pic/getFileList',
  FileDelete: '/api/v1/pic/FileDelete',
  exportData: '/api/v1/pic/exportData',
  importData: '/api/v1/pic/importData',
  getAbout: '/api/v1/pic/about',
  autoLaunchEnable: '/api/v1/setting/autoLaunchEnable',
  autoLaunchDisable: '/api/v1/setting/autoLaunchDisable',
  autoLaunchIsEnabled: '/api/v1/setting/autoLaunchIsEnabled'
}

/**
 * outApi
 */
export function outApi (uri, parameter) {
  return request({
    url: mainApi[uri],
    method: 'post',
    data: parameter
  })
}

/**
 * local api
 */
export function localApi (uri, parameter) {
  return request({
    url: mainApi[uri],
    method: 'post',
    data: parameter
  })
}